Option Public
Option Explicit
Sub Initialize
	'set up error handler
	On Error Goto catch
	
	'变量定义
	Dim s As New NotesSession'当前进程
	Dim dbCur As NotesDatabase'当前数据库
	Dim docIcon As NotesDocument'Icon文档
	
	'变量初始化
	Set dbCur = s.CurrentDatabase
	
	' access the database icon note is via the special NoteID "FFFF0010"
	Set docIcon = dbCur.GetDocumentByID("FFFF0010")                 
	
%REM
Here are some of the fields you might find on the icon note:
Field name 	Description
$Daos 	"0"  // enable|disable Domino Attachment and Object Storage (R8.5)
$Flags 	// A special string of flags that represent the database properties you see on the File - Application - Properties dialog box
$FormsTemplateFile 	"iNotes/Forms85.nsf"  // Where to find the Lotus iNotes UI
$HaikuFlags 	"1"  // This lets the Domino server know that the database uses a Lotus QuickPlace design
$LANGUAGE 	"en"  // The language of the design notes
$TITLE 	// The database title
$WebHybridDb 	 "1"  // This lets the Domino server know that the database does not use the standard Domino Web design
IconBitmap 	// The database icon
%END REM
	
	Msgbox "Icon Info:"
	
	Messagebox "$TITLE :" & docIcon.GetItemValue("$TITLE ")(0)
	
	Messagebox "$FormsTemplateFile:" & docIcon.GetItemValue("$FormsTemplateFile")(0)
	
	Messagebox "$Flags:" & docIcon.GetItemValue("$Flags")(0)
	
	'Call docIcon.ReplaceItemValue("$FormsTemplateFile", sFFName) 
	
	'Call docIcon.Save(True, False, True) 
	
	'Messagebox "Updated Icon note to " + sFFName 
	
	Goto finally
catch:
	'log error
	Msgbox Erl & ":" & Error
	'resume to the final thing
	Resume finally
	
finally:
	'do the final thing
	
End Sub